package se.mushroomwars.gameplay;

import java.awt.FlowLayout;

import javax.swing.JFrame;

import se.mushroomwars.network.ClientInterface;

public class Window extends JFrame{
	private static final long serialVersionUID = -1859724402148086355L;

	public void InitMainWindow(String windowTitle){
		
		this.setLayout(new FlowLayout());
		this.setTitle(windowTitle);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		ClientInterface gamePlay = new ClientInterface();
		this.add(new View(gamePlay));
		this.addKeyListener(new KeyboardController(gamePlay));
		//fullscreen
		//this.setUndecorated(true);
		this.pack();
		this.setVisible(true);
	}
	
	public static void main(String[] args) {
		Window test = new Window();
		test.InitMainWindow("test");
	}

}
